﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace J2i.Net.XnaXboxController
{
    class xmlSettings
    {
        String ip;

        public xmlSettings()
        {
            XmlTextReader textReader = new XmlTextReader("settingsWiifit.xml");
            //  Load the XML file: "settingsWiifit.xml"

            while (textReader.Read())
            {
                // Do some work here on the data.
                string tag = textReader.Name.ToString();
                XmlNodeType nType = textReader.NodeType;
                if (nType == XmlNodeType.Element && tag.Equals("ip"))
                {
                  textReader.MoveToNextAttribute();
                  ip = textReader.Value;
                }
            }
        }

        public string getIp() 
        {
            return ip;
        }

    }
}
